<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fck" uri="http://java.fckeditor.net"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
	<head>

		<title>update food</title>

	</head>

	<body>
		<table>
			<tr>
				<td>

					<form action="food_updateOneFood.action" method="post" enctype="multipart/form-data">
						<tr>
							<td>
								食品名称:
							</td>
							<td width="700">
								<input type="text" name="foodInstance.name"
									value="${foodInstance.name}" />
							</td>
						</tr>
						<tr>
							<td>
								概述:
							</td>
							<td>
								<fck:editor instanceName="foodInstance.description1"
									value="${foodInstance.description1}" />
							</td>
						</tr>
						<tr>
							<td>
								原料 :
							</td>
							<td>
								<fck:editor instanceName="foodInstance.description2"
									value="${foodInstance.description2}" />
							</td>
						</tr>
						<tr>
							<td>
								风味特色:
							</td>
							<td>
								<fck:editor instanceName="foodInstance.description3"
									value="${foodInstance.description3}" />
							</td>
						</tr>
						<tr>
							<td>
								上传图片:
							</td>
							<td>
								<input type="file" name="imageFile"
									value="${imageFile}" />
							</td>
						</tr>
						<tr>
							<td>
								首页显示的权重:
							</td>
							<td>
								<input type="text" name="foodInstance.isShowInMain"
									value="${foodInstance.isShowInMain}" />
						</tr>
						<tr>
							<td>
								二级页面显示的权重:
							</td>
							<td>
								<input type="text" name="foodInstance.isShowInSecond"
									value="${foodInstance.isShowInSecond}" />
						</tr>
						<input type="hidden" value="${foodType}"
							name="foodInstance.foodTypeId" />
						<input type="hidden" value="${foodId}" name="foodInstance.foodId" />
						<tr>
							<td colspan="2">
								<input type="submit" value="提交" />

								<input type="reset" value="重置">
							</td>
						</tr>
					</form>
					<tr>
						<td>
							<table border="1">
								<tr>
									<td colspan="3">
										首页显示的列表
									</td>
								</tr>
								<tr>
									<td>
										序号
									</td>
									<td>
										名称
									</td>
									<td>
										权重
									</td>
								</tr>
								<c:forEach items="${showInMainList}" var="foodfrist"
									varStatus="statu">
									<tr>
										<td>
											${statu.count}
										</td>
										<td>
											${foodfrist.name}
										</td>
										<td>
											${foodfrist.isShowInMain}
										</td>
									</tr>
								</c:forEach>
							</table>
						</td>
						<td>
							<table border="1">
								<tr>
									<td colspan="3">
										次级页面显示的列表
									</td>
								</tr>
								<tr>
									<td>
										序号
									</td>
									<td>
										名称
									</td>
									<td>
										权重
									</td>
								</tr>
								<c:forEach items="${showInSecondList}" var="foodsecond"
									varStatus="vars">
									<tr>
										<td>
											${vars.count}
										</td>
										<td>
											${foodsecond.name}
										</td>
										<td>
											${foodsecond.isShowInSecond}
										</td>
									</tr>
								</c:forEach>
							</table>
						</td>
					</tr>
		</table>
	</body>
</html>
